{% extends "base_tree.html" %}

{% block list %}
<h3>категория <a href="{% url ktit.storage.views.categorys.view category.id %}">{{ category.name }}</a></h3>
<p class="item_menu">
<a href="{% url ktit.storage.views.categorys.edit currentcategory %}">Изменить</a> |
<a href="{% url ktit.storage.views.categorys.delete currentcategory %}">Удалить</a>
</p>

<h3>Серийники <a href="{% url ktit.storage.views.parts.property part.id %}">{{ part.name }}</a> [{{ part.code }}] -- {{ part.quantity }} {{part.unit.name}}</h3>


<h4>Серийники</h4>
<form action="." method="POST">
  <table class="table_list"><tr>
    <th width="5%">#</th>
    <th width="5%">Выдача</th>
    <th width="20%">serial number</th>
    <th width="35%">in</th>
    <th width="35%">out</th>
  {% for serial in serials %}
    <tr class="{% cycle 'even' 'odd' %}">
    <td>{{ serial.id }}</td>
    <td><input type="checkbox" style="margin-left:0;" value="{{ serial.id }}" name="selected_serial"/></td>
    <td><input type="text" value="{{ serial.serial }}" style="margin-left:0;" name="serials"></input></td>
    <td><a href="{% url doc_property serial.document_in.document.id %}">{{ serial.document_in.document.name }}</a></td>
    <td><a href="">{{ serial.document_out.document.name }}</a></td>
    </tr>
  {% endfor %}
  </table>
    <input type="submit" value="Сохранить" name="save_serials">
    <input type="submit" value="Выдать отмеченные" name="delivery_serials">
</form>
{% endblock %}
